import axios from '../AjaxUtil.js'  //封装后
import $axios from 'axios'          //axios原生
import url from './url'

axios.defaults.withCredentials = false;

export default {
  // 测试
  test(params) {
    return axios.post(url.test, params)
  },
  //高德逆地理编码
  amap(params){
    return $axios.get('https://restapi.amap.com/v3/geocode/regeo',{params:params})
  },
  //微信jssdk签名
  getJssdkSign(params){
    return axios.post(url.getJssdkSign, params)
  },
  // 清理缓存
  cacheClear(params) {
    return axios.post(url.cacheClear, params)
  },
  // 图片上传配置
  systemConfig(params) {
    return axios.post(url.systemConfig, params)
  },
  uploaderImg(url,params) {
    return $axios.post(url,params);
  },
  //自定义
  userDefined(path,params){
    return axios.post(url.userDefined+path, params)
  },
  //幸运转盘信息
  luckWhellInfo(params){
    return axios.post(url.luckWhellInfo, params)
  },
  //幸运转盘点击开始
  luckTableClickBegin(params){
    return axios.post(url.luckTableClickBegin, params)
  },

  //开心博饼信息
  moonBattleAwardInfo(params){
    return axios.post(url.moonBattleAwardInfo, params)
  },
  //开心博饼点击开始
  moonBattleClickBegin(params){
    return axios.post(url.moonBattleClickBegin, params)
  },

  //随缘摇奖信息
  autoWinDrawInfo(params){
    return axios.post(url.autoWinDrawInfo, params)
  },
  //随缘摇奖点击开始
  autoWinClickBegin(params){
    return axios.post(url.autoWinClickBegin, params)
  },

  //好文共读分类
  articleGetArticlecate(params){
    return axios.post(url.articleGetArticlecate, params)
  },
  //文章详情
  articleGetArticledetail(params){
    return axios.post(url.articleGetArticledetail, params)
  },
  //文章列表
  articleGetArticlelist(params){
    return axios.post(url.articleGetArticlelist, params)
  },
  //有效阅读获取工分
  articleSetScore(params){
    return axios.post(url.articleSetScore, params)
  },

  //获取微信授权url
  wechatWechatOauth(params){
    return axios.post(url.wechatWechatOauth, params)
  },
  //授权登陆后获取用户的信息
  wechatGetWechatUser(params){
    return axios.post(url.wechatGetWechatUser, params)
  },
  //绑定手机号验证码发送
  userSendVerifyCode(params){
    return axios.post(url.userSendVerifyCode, params)
  },
  //绑定手机号
  userBindMobile(params){
    return axios.post(url.userBindMobile, params)
  },
  //绑定手机配置页
  userConfig(params){
    return axios.post(url.userConfig, params)
  },

  //个人中心信息
  userUserCenter(params){
    return axios.post(url.userUserCenter, params)
  },
  //用户工分明细列表
  userScoreFlowScoreDetail(params){
    return axios.post(url.userScoreFlowScoreDetail, params)
  },
  //社员推广的商户列表
  userGenMerchant(params){
    return axios.post(url.userGenMerchant, params)
  },
  //当前用户的下级社员列表
  userGeneralize(params){
    return axios.post(url.userGeneralize, params)
  },
  //钱包余额
  userBalance(params){
    return axios.post(url.userBalance, params)
  },
  //提现
  withdrawDeposit(params){
    return axios.post(url.withdrawDeposit, params)
  },
  //提现页面信息
  drawMsg(params){
    return axios.post(url.drawMsg, params)
  },
  //交易明细
  transactionDetail(params){
    return axios.post(url.transactionDetail, params)
  },
  //社员银行卡列表
  bankCardList(params){
    return axios.post(url.bankCardList, params)
  },
  //添加银行卡
  bankCardAdd(params){
    return axios.post(url.bankCardAdd, params)
  },
  //删除银行卡
  bankCardDelete(params){
    return axios.post(url.bankCardDelete, params)
  },
  //编辑银行卡
  bankCardEdit(params){
    return axios.post(url.bankCardEdit, params)
  },
  //成长计划
  upgradePlan(params){
    return axios.post(url.upgradePlan, params)
  },
  //物流信息
  userPrize(params){
    return axios.post(url.userPrize, params)
  },

  //轮播及筛选条件
  taskHallIndex(params){
    return axios.post(url.taskHallIndex, params)
  },
  //任务列表大厅
  taskList(params){
    return axios.post(url.taskList, params)
  },
  //任务详情大厅
  taskDetail(params){
    return axios.post(url.taskDetail, params)
  },
  //任务兑换
  taskExchange(params){
    return axios.post(url.taskExchange, params)
  },
  //兑换前选择收货地址-得奖品
  selectAddress(params){
    return axios.post(url.selectAddress, params)
  },
  //任务提交审核
  sendAudit(params){
    return axios.post(url.sendAudit, params)
  },
  //收货地址列表
  addressList(params){
    return axios.post(url.addressList, params)
  },
  //收货地址添加
  addressAdd(params){
    return axios.post(url.addressAdd, params)
  },
  //收货地址编辑
  addressEdit(params){
    return axios.post(url.addressEdit, params)
  },
  //收货地址删除
  addressDelete(params){
    return axios.post(url.addressDelete, params)
  },
  //我的任务-顶部状态+筛选条件 不传open_id
  myTaskFilter(params){
    return axios.post(url.myTaskFilter, params)
  },
  //我的任务列表 传open_id
  myTask(params){
    return axios.post(url.myTask, params)
  },
  //我的任务-任务详情
  mytaskDetail(params){
    return axios.post(url.mytaskDetail, params)
  },
}
